import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import Antd from "ant-design-vue";
import 'ant-design-vue/dist/reset.css';
// --------------------------------------------------------------------------------------------
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import '@kangc/v-md-editor/lib/theme/style/github.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index';
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
// Prism
import Prism from 'prismjs';
// highlight code
import 'prismjs/components/prism-json';
import hljs from 'highlight.js';
VMdPreview.use(vuepressTheme, {
  Prism,
});
VMdPreview.use(githubTheme, {
  Hljs: hljs,
});
// markdown支持流程图
// VMdPreview.use(createMermaidPlugin())
// markdown支持显示代码行数
VMdPreview.use(createLineNumbertPlugin())
// markdown支持代码快速复制
VMdPreview.use(createCopyCodePlugin());
// markdown支持emoji
VMdPreview.use(createEmojiPlugin());
VMdPreview.use(createAlignPlugin());
VMdPreview.use(createEmojiPlugin());
// ------------------------------------------------------------------------------
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import '@kangc/v-md-editor/lib/theme/style/github.css';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';
import createAlignPlugin from '@kangc/v-md-editor/lib/plugins/align';
VueMarkdownEditor.use(githubTheme, {
  Hljs: hljs,
});
VueMarkdownEditor.use(createAlignPlugin());
VueMarkdownEditor.use(createEmojiPlugin());
VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});
import json from 'highlight.js/lib/languages/json';

hljs.registerLanguage('json', json);


import VueParticles from 'vue-particles'
import global from './types/global';

const app = createApp(App);
app.config.globalProperties.$global = global;

app
  .use(Antd)
  .use(router)
  .use(VMdPreview)
  .use(VueMarkdownEditor)
  .use(VueParticles)
  .mount("#app")

